import { Constant } from "../../Constant";
import { Main } from "../../Main";
import StateBase from "../StateBase";

export default class SecondRecruitStartState extends StateBase {
    public begin(preState: number): void {
        super.begin(preState);
      //  console.log('PrepareState state--begin', this.getUserData());
        const main = this.getUserData() as Main;
        main.roundOptions[1].active = false;
        // main.lightAnimation.setColor([0, 0, 2]);
        main.roundTips[1].showStart(false);
        main.lightAnimation.startAnimation(0, -1, () => {
            console.log('动画完成', 0);
            main.secRoundRoles[0].setSelect();
            main.roundTips[1].showEnd();
            main.scheduleOnce(() => {
                main.mainFsm.goToState(Constant.MainState.SecondRecruitFinish, main);
            }, 1)
        });

    }
    public end(nextState: number): void {
        super.end(nextState);
        //console.log('PrepareState state--end');
    }
}